import Vue from 'vue'
import Router from 'vue-router'
import home from '@/views/index'
import login from '@/views/login'
import register from '@/views/register'
import product from '@/views/Product/index'
import details from '@/views/Product/details'
import integral from '@/views/Product/integral'
import sort from '@/views/Product/sort'
import mine from '@/views/My/index'
import contact from '@/views/My/contact'
import createOrder from '@/views/Order/createOrder'
import successOrder from '@/views/Order/successOrder'
import order from '@/views/Order/index'
import orderDetails from '@/views/Order/details'
import mycart from '@/views/Cart/index'


Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'home',
            component: home
        },
        {
            path: '/login',
            name: 'login',
            component: login
        },
        {
            path: '/productList',
            name: 'product',
            component: product
        }, {
            path: '/details',
            name: 'details',
            component: details
        },
        {
            path: '/sort',
            name: 'sort',
            component: sort
        }, {
            path: '/mine',
            name: 'mine',
            component: mine
        },
        {
            path: '/createOrder',
            name: 'createOrder',
            component: createOrder
        }, {
            path: '/successOrder',
            name: 'successOrder',
            component: successOrder
        },
        {
            path: '/order',
            name: 'order',
            component: order
        },
        {
            path: '/register',
            name: 'register',
            component: register
        }, {
            path: '/contact',
            name: 'contact',
            component: contact
        }, {
            path: '/mycart',
            name: 'mycart',
            component: mycart
        },
        {
            path: '/integral',
            name: 'integral',
            component: integral
        }, {
            path: '/orderDetails',
            name: 'orderDetails',
            component: orderDetails
        }
    ]
})